package org.example.blogserver.vo;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result {

    private String status;

    private int code;

    private String msg;

    private Object data;


    public static Result success( String msg,Object data){
        return new Result("success",200,msg,data);
    }

    public static Result fail(int code, String msg){
        return new Result("fail",code,msg,null);
    }
}
